<div class="card">
    <div class="card-header">
    
      <button class="btn btn-primary" (click)="addNews()">添加</button>
    </div>
    <div class="card-body">
    
    <table class="table table-striped table-dark">
    <tr>
    <th>序号</th>
    <th>主键</th>
    <th>标题</th>
    <th>作者</th>
    <th>发布时间</th>
    <th>内容</th>
    <th>操作</th>
    </tr>
    
    
    <tr *ngFor="let n of nl" >
    <td>{{n.px}}</td>
    <td>{{n.newsid}}</td>
    <td>{{n.title}}</td>
    <td>{{n.author}}</td>
    <td>{{n.pbdate | date:'yyyy-MM-dd HH:mm'}}</td>
    <td>
      <div [innerHTML] = "n.content | tohtml"></div>
    </td>
    <td>
    <button class="btn btn-warning" (click)="updateNews(n.newsid)">修改</button>
    <button class="btn btn-danger" (click)="deleteNews(n.newsid)">删除</button>
    <button class="btn btn-info" (click)="toDetail(n.newsid)">预览</button>
    </td>
    </tr>
    </table>
    </div>
    
    <div class="card-foot">
        <nav aria-label="Page navigation example">
            <ul class="pagination">
              <li class="page-item"><a class="page-link" href="#">Previous</a></li>
              <li class="page-item"><a class="page-link" href="#">1</a></li>
              <li class="page-item"><a class="page-link" href="#">2</a></li>
              <li class="page-item"><a class="page-link" href="#">3</a></li>
              <li class="page-item"><a class="page-link" href="#">Next</a></li>
            </ul>
          </nav>
    </div>
    
    <div class="card">

      

    </div>
    
    </div>
    